


#include "Server_Base.h"



/*
    setnonblocking - 设置句柄为非阻塞方式
    */
int Server_Base::setNonblocking(int sockfd)
{
    if (fcntl(sockfd, F_SETFL, fcntl(sockfd, F_GETFD, 0)|O_NONBLOCK) == -1)
     {
        return SERVER_DEFAULT_FAILED;
     }
    return SERVER_DEFAULT_SUCCESS;
}